package com.infosys.newSimpleInvertedIndex.helper;

import org.ansj.lucene9.AnsjAnalyzer;
import org.apache.lucene.analysis.Analyzer;

import java.io.IOException;
import java.util.List;

public abstract class BaseLuceneHelper<T> {
    protected static String indexPath = "/src/main/resources/index";
    protected static Analyzer analyzer = new AnsjAnalyzer(AnsjAnalyzer.TYPE.index_ansj);
    public abstract void constructIndex(List<T> objects, boolean erase) throws IOException;
    public abstract List<T> queryIndex(String field, String queryText) throws IOException;
}



